feat: Expose Rokt launcher config options#30
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR exposes Rokt launcher configuration options by transitioning from using custom flags to directly utilizing a launcherOptions property.
- Updated tests to verify launcherOptions functionality instead of customFlags
- Modified Rokt-Kit to initialize and use launcherOptions when generating integration names and attaching the launcher
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/src/tests.js | Updated tests to use launcherOptions and clean up test state |
| src/Rokt-Kit.js | Introduced launcherOptions and refactored integration name generation |
There was a problem hiding this comment.
Pull Request Overview
This PR exposes new Rokt integration launcher configuration options via window.mParticle.Rokt.launcherOptions and updates related tests.
- Introduce
launcherOptionsin the Rokt-Kit constructor and pass them through toattachLauncher - Remove old
customFlagslogic and update method signature variables - Rename and adjust tests to reference
launcherOptionsinstead ofcustomFlags
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/src/tests.js | Updated test names and teardown to use launcherOptions |
| src/Rokt-Kit.js | Removed legacy flag parsing and read launcher options globally |
Comments suppressed due to low confidence (2)
src/Rokt-Kit.js:55
- The parameter
_customFlagsis no longer used inside this function. Removing unused parameters will improve readability and prevent confusion.
function (settings, testMode, _trackerId, filteredUserAttributes, _filteredUserIdentities, _appVersion, _appName, _customFlags) {
test/src/tests.js:142
- This test sets
noFunctionalandnoTargetinginlauncherOptionsbut does not assert that these options are passed towindow.Rokt.createLauncher. Add assertions on the call parameters to ensure those flags propagate correctly.
it('should set optional settings from launcherOptions', async () => {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
rmi22186
left a comment
There was a problem hiding this comment.
pending approval of mParticle/mparticle-web-sdk#1033
There was a problem hiding this comment.
Pull Request Overview
This PR exposes additional configuration options for the Rokt Web SDK by allowing users to pass launcher configuration through mParticle. Key changes include:
- Adding a new sandbox flag via window.mParticle.Rokt.managerOptions.
- Refactoring the extraction of launcher options from customFlags to launcherOptions.
- Updating tests to verify the new configuration options.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/src/tests.js | Updated tests to validate the new sandbox and launcherOptions flags. |
| src/Rokt-Kit.js | Refactored configuration extraction and updated attachLauncher API to include sandbox. |
Comments suppressed due to low confidence (1)
test/src/tests.js:100
- Consider adding tests to verify the default behavior when neither managerOptions nor launcherOptions are provided, ensuring that integrationName and sandbox default correctly.
afterEach(() => {
There was a problem hiding this comment.
Pull Request Overview
This PR exposes Rokt launcher configuration options to allow the Core SDK to pass configuration options to the Rokt Web SDK. Key changes include:
- Adding sandbox handling via managerOptions in both the kit and test files.
- Removing usage of customFlags in favor of launcherOptions and managerOptions.
- Updating test cases to validate the new configuration options for the Rokt launcher.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/src/tests.js | Updated tests to check sandbox behavior and proper application of launcherOptions. |
| src/Rokt-Kit.js | Refactored configuration handling by replacing customFlags with managerOptions and launcherOptions; updated attachLauncher signature accordingly. |
# [1.4.0](v1.3.2...v1.4.0) (2025-06-02) ### Features * Expose Rokt launcher config options ([#30](#30)) ([6cf2344](6cf2344))
Summary
Exposes Rokt integration launcher config options. This will act as a pass-through for the Core SDK to use to allow users to pass configuration options for the Rokt Web SDK.
Requires mParticle/mparticle-web-sdk#1033 to be merged in
Testing Plan